<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html;  charset=utf-8">
<title>{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}</title>
<meta name="keywords" content="{$SEO['keyword']}">
<meta name="description" content="{$SEO['description']}"> 
<link href="{THEME_STYLE_PATH}style/css/default_new.css" type="text/css" rel="stylesheet" />
<script src="{THEME_STYLE_PATH}style/js/jquery.min.js"></script>
<script src="{THEME_STYLE_PATH}style/js/core.js"></script>
<link href="{THEME_STYLE_PATH}style/css/percenter.css" type="text/css" rel="stylesheet" />
<!--[if IE 6]>
<script src="/js/DD_belatedPNG.js"></script>
<script>
  DD_belatedPNG.fix('*');
</script>
<![endif]-->
<!--[if IE 6]>
<style type="text/css">
    html{overflow:hidden;}
    body{height:100%;overflow:auto;}
</style>
<![endif]-->
</head>

<body>
	
	{include template('header','common')}
	<div id="Mainbox">
<!--插入侧边栏-->
		{include template('sidebar_login','common')}
		<!--插入侧边栏-->
		{include template('top_advance','common')}
		
		<!-- 左侧 -->
		{include template('member_left','common')}
		<!--右侧-->
		<!--右侧-->
		<div class="percenter_right">
			<div class="aboutper_acc">
				<p class="a1" style="margin-bottom:15px;">修改头像</p>
				<!--div class="tyopt"><a href="#" class="on">上传头像</a>&nbsp;&nbsp;<a href="#">系统头像</a></div-->
				<!--div class="upload_pic">
					插件插件插件
				</div-->
				<div class="sys_pic">
					<ul>
					<?php $avatarid = getUserInfo($this->userid,'photo',TRUE); ?>
					<?php 
					for ($i=1; $i < 21; $i++) { 
					?>
					{if $i != $avatarid}
					<li><div class="sys_pic_use" style="display:none;"><a href="javascript:void(0);" onclick="usePhoto(<?php echo $i ?>)">使用该头像</a></div><img src="{THEME_STYLE_PATH}style/avatar/default/<?php echo $i ?>.jpg" height="100" width="100"></li>
					{else}
					<li><div class="sys_pic_on"><a href="javascript:void(0);">当前使用中</a></div><img src="{THEME_STYLE_PATH}style/avatar/default/<?php echo $i ?>.jpg" height="100" width="100"></li>
					{/if}
					<?php
					}
					?>		
					</ul>
				</div>
			</div>					
		</div>
		<!--右侧-->
		<div class="clear"></div>
	</div>
	<!--主体-->
	<!--尾部-->
	{include template('footer','common')}

	
	

	<!--尾部-->


<script type="text/javascript">
$(function(){
	$('.sys_pic ul li').mouseover(function(){
		$(this).find('.sys_pic_use').show();
	}).mouseout(function(){
		$(this).find('.sys_pic_use').hide();
	});
});
function usePhoto(id) {
	$.ajax({
		type: "POST",
		url: "{U('Member/Profile/edit_photo')}",
		dataType: "json",
		data : {"act":"changePhoto","pid":id},
		success: function(data){
			if(data.flag==1) {
				juxiangyou.component.popup._reload = true;
				juxiangyou.component.popup.prompt(data.msg,300);
			} else {
				juxiangyou.component.popup.prompt(data.msg,300);
			}
		}
	});
}
</script>
</body>
</html>
